import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;




public class MenuBar extends JFrame {
	JMenuBar menubar = new JMenuBar();
	JMenu file = new JMenu("File");
	
	
	public MenuBar () {
		
		file.setMnemonic(KeyEvent.VK_F);
		
		JMenuItem fileClose = new JMenuItem("Close");
		
		fileClose.setMnemonic(KeyEvent.VK_C);
		
        fileClose.setToolTipText("Exit application");
        
        fileClose.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                System.exit(0);
            }
        });
        
        file.add(fileClose);

        menubar.add(file);

        
        
        //setVisible(true);
	}
	
	
	
	
	

}
